import axios from "axios";

let context = "/storeservice";

/**
 * 获取 Storegroup 分页列表
 */
export function getStoreGroupPagination(data: any) {
  return axios.get(`${context}/storeGroup/pagination`, { params: data });
}

/**
 * 获取 Storegroup 所有数据
 */
export function getStoreGroupAllList(data: any) {
  return axios.get(`${context}/storeGroup/allList`, { params: data });
}

/**
 * 获取 Storegroup 详情
 */
export function getStoreGroupDetailById(id: any) {
  return axios.get(`${context}/storeGroup/${id}`, { params: { id } });
}

/**
 * 新增 Storegroup
 */
export function addStoreGroup(data: any) {
  return axios.post(`${context}/storeGroup`, data);
}

/**
 * 批量新增
 * */
export function batchAddStoregroup(data: any) {
  return axios.post(`${context}/storeGroup/batchLoad`, data);
}

/**
 * 修改 Storegroup
 */
export function updateStoreGroup(data: any) {
  return axios.put(`${context}/storeGroup`, data);
}

/**
 * 删除 Storegroup
 */
export function batchRemoveStoreGroup(data: any) {
  return axios.post(`${context}/storeGroup/batchRemove`, data);
}
